package com.lin.cms.criteria;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class MessageCriteria {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MessageCriteria() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMsgIdIsNull() {
            addCriterion("msg_id is null");
            return (Criteria) this;
        }

        public Criteria andMsgIdIsNotNull() {
            addCriterion("msg_id is not null");
            return (Criteria) this;
        }

        public Criteria andMsgIdEqualTo(Integer value) {
            addCriterion("msg_id =", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdNotEqualTo(Integer value) {
            addCriterion("msg_id <>", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdGreaterThan(Integer value) {
            addCriterion("msg_id >", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_id >=", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdLessThan(Integer value) {
            addCriterion("msg_id <", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdLessThanOrEqualTo(Integer value) {
            addCriterion("msg_id <=", value, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdIn(List<Integer> values) {
            addCriterion("msg_id in", values, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdNotIn(List<Integer> values) {
            addCriterion("msg_id not in", values, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdBetween(Integer value1, Integer value2) {
            addCriterion("msg_id between", value1, value2, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgIdNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_id not between", value1, value2, "msgId");
            return (Criteria) this;
        }

        public Criteria andMsgTitleIsNull() {
            addCriterion("msg_title is null");
            return (Criteria) this;
        }

        public Criteria andMsgTitleIsNotNull() {
            addCriterion("msg_title is not null");
            return (Criteria) this;
        }

        public Criteria andMsgTitleEqualTo(String value) {
            addCriterion("msg_title =", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleNotEqualTo(String value) {
            addCriterion("msg_title <>", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleGreaterThan(String value) {
            addCriterion("msg_title >", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleGreaterThanOrEqualTo(String value) {
            addCriterion("msg_title >=", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleLessThan(String value) {
            addCriterion("msg_title <", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleLessThanOrEqualTo(String value) {
            addCriterion("msg_title <=", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleLike(String value) {
            addCriterion("msg_title like", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleNotLike(String value) {
            addCriterion("msg_title not like", value, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleIn(List<String> values) {
            addCriterion("msg_title in", values, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleNotIn(List<String> values) {
            addCriterion("msg_title not in", values, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleBetween(String value1, String value2) {
            addCriterion("msg_title between", value1, value2, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andMsgTitleNotBetween(String value1, String value2) {
            addCriterion("msg_title not between", value1, value2, "msgTitle");
            return (Criteria) this;
        }

        public Criteria andSendTimeIsNull() {
            addCriterion("send_time is null");
            return (Criteria) this;
        }

        public Criteria andSendTimeIsNotNull() {
            addCriterion("send_time is not null");
            return (Criteria) this;
        }

        public Criteria andSendTimeEqualTo(Date value) {
            addCriterion("send_time =", value, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeNotEqualTo(Date value) {
            addCriterion("send_time <>", value, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeGreaterThan(Date value) {
            addCriterion("send_time >", value, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("send_time >=", value, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeLessThan(Date value) {
            addCriterion("send_time <", value, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeLessThanOrEqualTo(Date value) {
            addCriterion("send_time <=", value, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeIn(List<Date> values) {
            addCriterion("send_time in", values, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeNotIn(List<Date> values) {
            addCriterion("send_time not in", values, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeBetween(Date value1, Date value2) {
            addCriterion("send_time between", value1, value2, "sendTime");
            return (Criteria) this;
        }

        public Criteria andSendTimeNotBetween(Date value1, Date value2) {
            addCriterion("send_time not between", value1, value2, "sendTime");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserIsNull() {
            addCriterion("msg_send_user is null");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserIsNotNull() {
            addCriterion("msg_send_user is not null");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserEqualTo(Integer value) {
            addCriterion("msg_send_user =", value, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserNotEqualTo(Integer value) {
            addCriterion("msg_send_user <>", value, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserGreaterThan(Integer value) {
            addCriterion("msg_send_user >", value, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_send_user >=", value, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserLessThan(Integer value) {
            addCriterion("msg_send_user <", value, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserLessThanOrEqualTo(Integer value) {
            addCriterion("msg_send_user <=", value, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserIn(List<Integer> values) {
            addCriterion("msg_send_user in", values, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserNotIn(List<Integer> values) {
            addCriterion("msg_send_user not in", values, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserBetween(Integer value1, Integer value2) {
            addCriterion("msg_send_user between", value1, value2, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgSendUserNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_send_user not between", value1, value2, "msgSendUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserIsNull() {
            addCriterion("msg_receiver_user is null");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserIsNotNull() {
            addCriterion("msg_receiver_user is not null");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserEqualTo(Integer value) {
            addCriterion("msg_receiver_user =", value, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserNotEqualTo(Integer value) {
            addCriterion("msg_receiver_user <>", value, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserGreaterThan(Integer value) {
            addCriterion("msg_receiver_user >", value, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_receiver_user >=", value, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserLessThan(Integer value) {
            addCriterion("msg_receiver_user <", value, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserLessThanOrEqualTo(Integer value) {
            addCriterion("msg_receiver_user <=", value, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserIn(List<Integer> values) {
            addCriterion("msg_receiver_user in", values, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserNotIn(List<Integer> values) {
            addCriterion("msg_receiver_user not in", values, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserBetween(Integer value1, Integer value2) {
            addCriterion("msg_receiver_user between", value1, value2, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andMsgReceiverUserNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_receiver_user not between", value1, value2, "msgReceiverUser");
            return (Criteria) this;
        }

        public Criteria andSiteIdIsNull() {
            addCriterion("site_id is null");
            return (Criteria) this;
        }

        public Criteria andSiteIdIsNotNull() {
            addCriterion("site_id is not null");
            return (Criteria) this;
        }

        public Criteria andSiteIdEqualTo(Integer value) {
            addCriterion("site_id =", value, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdNotEqualTo(Integer value) {
            addCriterion("site_id <>", value, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdGreaterThan(Integer value) {
            addCriterion("site_id >", value, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("site_id >=", value, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdLessThan(Integer value) {
            addCriterion("site_id <", value, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdLessThanOrEqualTo(Integer value) {
            addCriterion("site_id <=", value, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdIn(List<Integer> values) {
            addCriterion("site_id in", values, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdNotIn(List<Integer> values) {
            addCriterion("site_id not in", values, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdBetween(Integer value1, Integer value2) {
            addCriterion("site_id between", value1, value2, "siteId");
            return (Criteria) this;
        }

        public Criteria andSiteIdNotBetween(Integer value1, Integer value2) {
            addCriterion("site_id not between", value1, value2, "siteId");
            return (Criteria) this;
        }

        public Criteria andMsgStatusIsNull() {
            addCriterion("msg_status is null");
            return (Criteria) this;
        }

        public Criteria andMsgStatusIsNotNull() {
            addCriterion("msg_status is not null");
            return (Criteria) this;
        }

        public Criteria andMsgStatusEqualTo(Boolean value) {
            addCriterion("msg_status =", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusNotEqualTo(Boolean value) {
            addCriterion("msg_status <>", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusGreaterThan(Boolean value) {
            addCriterion("msg_status >", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusGreaterThanOrEqualTo(Boolean value) {
            addCriterion("msg_status >=", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusLessThan(Boolean value) {
            addCriterion("msg_status <", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusLessThanOrEqualTo(Boolean value) {
            addCriterion("msg_status <=", value, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusIn(List<Boolean> values) {
            addCriterion("msg_status in", values, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusNotIn(List<Boolean> values) {
            addCriterion("msg_status not in", values, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusBetween(Boolean value1, Boolean value2) {
            addCriterion("msg_status between", value1, value2, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgStatusNotBetween(Boolean value1, Boolean value2) {
            addCriterion("msg_status not between", value1, value2, "msgStatus");
            return (Criteria) this;
        }

        public Criteria andMsgBoxIsNull() {
            addCriterion("msg_box is null");
            return (Criteria) this;
        }

        public Criteria andMsgBoxIsNotNull() {
            addCriterion("msg_box is not null");
            return (Criteria) this;
        }

        public Criteria andMsgBoxEqualTo(Integer value) {
            addCriterion("msg_box =", value, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxNotEqualTo(Integer value) {
            addCriterion("msg_box <>", value, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxGreaterThan(Integer value) {
            addCriterion("msg_box >", value, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxGreaterThanOrEqualTo(Integer value) {
            addCriterion("msg_box >=", value, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxLessThan(Integer value) {
            addCriterion("msg_box <", value, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxLessThanOrEqualTo(Integer value) {
            addCriterion("msg_box <=", value, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxIn(List<Integer> values) {
            addCriterion("msg_box in", values, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxNotIn(List<Integer> values) {
            addCriterion("msg_box not in", values, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxBetween(Integer value1, Integer value2) {
            addCriterion("msg_box between", value1, value2, "msgBox");
            return (Criteria) this;
        }

        public Criteria andMsgBoxNotBetween(Integer value1, Integer value2) {
            addCriterion("msg_box not between", value1, value2, "msgBox");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}